3.452 \(\int \frac{\sec (c+d x)}{a+b \tan ^2(c+d x)} \, dx\)

Optimal. Leaf size=40 \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{a-b} \sin (c+d x)}{\sqrt{a}}\right )}{\sqrt{a} d \sqrt{a-b}} \]

[Out]

ArcTanh[(Sqrt[a - b]*Sin[c + d*x])/Sqrt[a]]/(Sqrt[a]*Sqrt[a - b]*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0461854, antiderivative size = 40, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3676, 208} \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{a-b} \sin (c+d x)}{\sqrt{a}}\right )}{\sqrt{a} d \sqrt{a-b}} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]/(a + b*Tan[c + d*x]^2),x]

[Out]

ArcTanh[(Sqrt[a - b]*Sin[c + d*x])/Sqrt[a]]/(Sqrt[a]*Sqrt[a - b]*d)

Rule 3676

Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^(n_))^(p_.), x_Symbol] :> With[{ff = F
reeFactors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[ExpandToSum[b*(ff*x)^n + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 -
ff^2*x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n/2] && IntegerQ[p]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{\sec (c+d x)}{a+b \tan ^2(c+d x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{a-(a-b) x^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac{\tanh ^{-1}\left (\frac{\sqrt{a-b} \sin (c+d x)}{\sqrt{a}}\right )}{\sqrt{a} \sqrt{a-b} d}\\ \end{align*}

Mathematica [A]  time = 0.0472236, size = 40, normalized size = 1. \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{a-b} \sin (c+d x)}{\sqrt{a}}\right )}{\sqrt{a} d \sqrt{a-b}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]/(a + b*Tan[c + d*x]^2),x]

[Out]

ArcTanh[(Sqrt[a - b]*Sin[c + d*x])/Sqrt[a]]/(Sqrt[a]*Sqrt[a - b]*d)

________________________________________________________________________________________

Maple [A]  time = 0.056, size = 36, normalized size = 0.9 \begin{align*}{\frac{1}{d}{\it Artanh} \left ({ \left ( a-b \right ) \sin \left ( dx+c \right ){\frac{1}{\sqrt{a \left ( a-b \right ) }}}} \right ){\frac{1}{\sqrt{a \left ( a-b \right ) }}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)/(a+b*tan(d*x+c)^2),x)

[Out]

1/d/(a*(a-b))^(1/2)*arctanh((a-b)*sin(d*x+c)/(a*(a-b))^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+b*tan(d*x+c)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.32869, size = 279, normalized size = 6.98 \begin{align*} \left [\frac{\log \left (-\frac{{\left (a - b\right )} \cos \left (d x + c\right )^{2} - 2 \, \sqrt{a^{2} - a b} \sin \left (d x + c\right ) - 2 \, a + b}{{\left (a - b\right )} \cos \left (d x + c\right )^{2} + b}\right )}{2 \, \sqrt{a^{2} - a b} d}, -\frac{\sqrt{-a^{2} + a b} \arctan \left (\frac{\sqrt{-a^{2} + a b} \sin \left (d x + c\right )}{a}\right )}{{\left (a^{2} - a b\right )} d}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+b*tan(d*x+c)^2),x, algorithm="fricas")

[Out]

[1/2*log(-((a - b)*cos(d*x + c)^2 - 2*sqrt(a^2 - a*b)*sin(d*x + c) - 2*a + b)/((a - b)*cos(d*x + c)^2 + b))/(s
qrt(a^2 - a*b)*d), -sqrt(-a^2 + a*b)*arctan(sqrt(-a^2 + a*b)*sin(d*x + c)/a)/((a^2 - a*b)*d)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec{\left (c + d x \right )}}{a + b \tan ^{2}{\left (c + d x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+b*tan(d*x+c)**2),x)

[Out]

Integral(sec(c + d*x)/(a + b*tan(c + d*x)**2), x)

________________________________________________________________________________________

Giac [A]  time = 1.72895, size = 63, normalized size = 1.58 \begin{align*} -\frac{\arctan \left (\frac{a \sin \left (d x + c\right ) - b \sin \left (d x + c\right )}{\sqrt{-a^{2} + a b}}\right )}{\sqrt{-a^{2} + a b} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+b*tan(d*x+c)^2),x, algorithm="giac")

[Out]

-arctan((a*sin(d*x + c) - b*sin(d*x + c))/sqrt(-a^2 + a*b))/(sqrt(-a^2 + a*b)*d)